﻿@{
    ViewBag.Title = "PassEventData";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<h2>Pass Event Data</h2>

Name: <input id="txtName" class="inputbox" type="text" />
<br />
Age: <input id="txtAge" class="inputbox" type="text" />

<button id="btnSubmit">Submit</button>

<script type="text/javascript">
    var person = {
        Name: 'david',
        Age: 20
    };

    $(document).ready(function () {
        $('#btnSubmit').on('click', person, function (eventObj) {
            person.Name = $('#txtName').val();
            person.Age = $('#txtAge').val();

            ZEUS.DEBUG.log("Name: " + eventObj.data.Name);
            ZEUS.DEBUG.log("Age: " + eventObj.data.Age);
        });
    });
</script>
